<?php
/**
 * undocumented class
 *
 * @package default
 * @author Alexander Sibiryakov
 **/
class smallDBAL
{
	private $dblink;
	public function __construct($db_config) {
		$this->dblink = mysql_connect($db_config['db_host'], 
			$db_config['db_user'],
			$db_config['db_password']
		);
		mysql_select_db($db_config['db_name'], $this->dblink);

		if(isset($db_config['db_encoding']) && $db_config['db_encoding']) {
			mysql_query("SET NAMES " . $db_config['db_encoding']);
		}	
	}
	
	public function query($sql) {
		return mysql_query($sql, $this->dblink);
	}
} // END class 